<!-- Footer -->
<div class="footer-category-list">
	<ul>
		<?php 
			$categories = get_categories('child_of=45&hide_empty=0'); 
			foreach ($categories as $category) {
		?>
			<li class="item-list">
				<a href="<?php bloginfo('url'); ?>/category/<?php echo $category->slug; ?>"><?php echo $category->cat_name; ?></a></li> 
		<?php } ?>
	</ul>
</div>
<?php wp_reset_query(); ?>

<div class="footer-category-list">
	<ul>
		<?php 
			$categories = get_categories('child_of=46&hide_empty=0'); 
			foreach ($categories as $category) {
		?>
			<li class="item-list">
				<a href="<?php bloginfo('url'); ?>/category/<?php echo $category->slug; ?>"><?php echo $category->cat_name; ?></a></li> 
		<?php } ?>
	</ul>
</div>
<?php wp_reset_query(); ?>

<div class="aliados-icons">
    <div class="logo logo-euro">
        <a target="_blank" href="http://europa.eu/index_es.htm"><img src="http://conexioncop.com/wp/wp-content/uploads/2014/11/footer-logo-euro.png"/></a>
    </div>
    <div class="logo logo-euroclima">
        <a target="_blank" href="http://www.euroclima.org/es/"><img src="http://conexioncop.com/wp/wp-content/uploads/2014/11/footer-logo-euroclima.png"/></a>
    </div>
    <div class="logo logo-pnuma">
        <a target="_blank" href="http://www.pnuma.org/"><img src="http://conexioncop.com/wp/wp-content/uploads/2014/11/footer-logo-pnuma.png"/></a>
    </div>
    <div class="logo logo-libelula">
        <a target="_blank" href="http://www.libelula.com.pe/"><img src="http://conexioncop.com/wp/wp-content/uploads/2014/11/footer-logo-libelula.png"/></a>
    </div>
</div>

<!-- Sidebar -->

<div class="events-widget">
    <div class="events-list">
        [spiffy-upcoming-list]
    </div>
    <div class="events-readmore">
        <a href="/wp/eventos-destacados/">Ver todos</a>
    </div>
</div>

<div class="newsletter-suscription">
    <div class="text">Si quieres recibir los art&iacute;culos m&aacute;s recientes en tu correo electr&oacute;nico, d&eacute;janos tu informaci&oacute;n abajo</div>
    <form class="suscription-form" action="//conexioncop.us9.list-manage.com/subscribe/post?u=d6cf79869d8fc835c226baca0&amp;id=1ca460cfc5" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank" novalidate>
        <input class="suscription-text" type="email" value="" name="EMAIL" id="mce-EMAIL" onfocus="this.value=''; this.onfocus=null;" placeholder="Tu correo aquí" required />
        <input class="suscription-button" type="submit" value="Suscribirme" id="mc-embedded-subscribe" />
    </form>
    <div style="position: absolute; left: -5000px;"><input type="text" name="b_d6cf79869d8fc835c226baca0_1ca460cfc5" tabindex="-1" value=""></div>
</div>

<div class="related-posts-widget">
<?php
//for use in the loop, list all posts with tags contained on current post, exlcuding the current post
global $post;
$tags = wp_get_post_tags($post->ID);
if ($tags) {
    $term_ids = array();
    foreach ($tags as $tag) {
        array_push($term_ids, $tag->term_id);
    }
    $args = array(
        'tag__in' => $term_ids,
        'post__not_in' => array($post->ID),
        'post_type' => 'post',
        'post_status' => 'publish',
        'posts_per_page' => 5,
        'caller_get_posts' => 1
    );
    $my_query = null;
    $my_query = new WP_Query($args);
    if ($my_query->have_posts()) {
        while ($my_query->have_posts()) : $my_query->the_post();
            ?>
            <div class="related-post">
                <div class="related-post-title">
                    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
                        <?php the_title(); ?>
                    </a>
                </div>
                <div class="related-post-date"><?php the_time('M j, Y'); ?></div>
            </div>
            <?php
        endwhile;
    } else {
        echo 'No se encontraron art&iacute;culos relacionados';
    }
    wp_reset_query();  // Restore global post data stomped by the_post().
} else {
    echo 'No se encontraron etiquetas para el presente art&iacute;culo';
}
?>
</div>


<!-- Blog -->
<div class="blog_banner_wrapper">
    <img class="banner" src="http://conexioncop.com/wp/wp-content/uploads/2014/11/blog-banner.jpg" />
    <a class="logo-tunza" href="http://www.pnuma.org/tunza/">Logo</a>
    <a class="logo-masuno" href="http://generacionmasuno.pe/">Logo</a>
</div>